package com.xxx.oauth.client;

import org.apache.shiro.authc.AuthenticationToken;

/**
 * OAuth2Token bean
 * 存储oauth2服务端返回的授权码和用户名.
 */
public class OAuth2Token implements AuthenticationToken {

	private static final long serialVersionUID = -1029949927895904756L;

    private String authCode;
    private String principal;

    public String getAuthCode() {
        return authCode;
    }

    public void setAuthCode(String authCode) {
        this.authCode = authCode;
    }

    public String getPrincipal() {
        return principal;
    }

    public void setPrincipal(String principal) {
        this.principal = principal;
    }

    @Override
    public Object getCredentials() {
        return authCode;
    }

	public OAuth2Token(String authCode) {
        this.authCode = authCode;
    }
}
